import React, { useEffect } from 'react'
import { connect, useDispatch } from 'react-redux'
import axios from 'axios'

export const Home = ({ count }) => {
    const dispatch = useDispatch()
    useEffect(() => {
        console.log(count);
    }, [dispatch])

    return (
        <div>
            11111
        </div>
    )
}

const mapStateToProps = ({ count }) => {
    return {
        count
    }
}

const mapDispatchToProps = (dispatch) => {
    return dispatch({ type: "setcount" })
}

export default connect(mapStateToProps, mapDispatchToProps)(Home)